package com.cz.spb_activiti.json;

import com.alibaba.fastjson2.JSONObject;
import com.cz.spb_activiti.pojo.Demand;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.HashMap;

@SpringBootTest
public class FastJson {
    @Test
    void test(){
        Demand demand = new Demand();
        demand.setId("001");
        HashMap<Object, Object> objectObjectHashMap = new HashMap<>();
        objectObjectHashMap.put("demand",demand);
        System.out.println(new JSONObject(objectObjectHashMap).toJSONString());

    }
}
